﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Aceso.LOreal.Web.Areas.ModuleSys.Controllers
{
    public class AccountController : Controller
    {
        // GET: ModuleSys/Account
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult LoginOut()
        {
            int count = Request.Cookies.Count;
            for (int i = 0; i < count; i++)
            {
                HttpCookie tempCookie;
                string cookieName = Request.Cookies[i].Name;
                tempCookie = new HttpCookie(cookieName);
                tempCookie.Expires = DateTime.Now.AddDays(-1);
                Response.Cookies.Add(tempCookie);
            }
            Session.Clear();
            return Redirect(Url.Content("~/Account/Logout"));
        }
    }
}